
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <title>Swiper demo</title>
    <meta
      name="viewport"
      content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1"
    />
    <!-- Link Swiper's CSS -->
    <link
      rel="stylesheet"
      href="./swiper/swiper-bundle.min.css"
    />

    <!-- Demo styles -->
    <style>
      html,
      body {
        position: relative;
        height: 100%;
      }

      body {
        background: #eee;
        font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
        font-size: 14px;
        color: #000;
        margin: 0;
        padding: 0;
      }

      .swiper {
        width: 100%;
        height: 100%;
      }

      .swiper-slide {
        text-align: center;
        font-size: 18px;
        background: #000;
      }

      .swiper-slide img {
        width: auto;
        height: auto;
        max-width: 100%;
        max-height: 100%;
        -ms-transform: translate(-50%, -50%);
        -webkit-transform: translate(-50%, -50%);
        -moz-transform: translate(-50%, -50%);
        transform: translate(-50%, -50%);
        position: absolute;
        left: 50%;
        top: 50%;
      }
    </style>
  </head>

  <body>
    <!-- Swiper -->

    <div
      style="--swiper-navigation-color: #fff; --swiper-pagination-color: #fff"
      class="swiper mySwiper"
    >
      <div class="swiper-wrapper">
        <div class="swiper-slide">
          <!-- Required swiper-lazy class and image source specified in data-src attribute -->
          <img
            data-src="./images/nature-1.jpg"
            class="swiper-lazy"
          />
          <!-- Preloader image -->
          <div class="swiper-lazy-preloader swiper-lazy-preloader-white"></div>
        </div>
        <div class="swiper-slide">
          <!-- Required swiper-lazy class and image source specified in data-src attribute -->
          <img
            data-src="./images/nature-2.jpg"
            class="swiper-lazy"
          />
          <!-- Preloader image -->
          <div class="swiper-lazy-preloader swiper-lazy-preloader-white"></div>
        </div>
        <div class="swiper-slide">
          <!-- Required swiper-lazy class and image source specified in data-src attribute -->
          <img
            data-src="./images/nature-3.jpg"
            class="swiper-lazy"
          />
          <!-- Preloader image -->
          <div class="swiper-lazy-preloader swiper-lazy-preloader-white"></div>
        </div>
        <div class="swiper-slide">
          <!-- Required swiper-lazy class and image source specified in data-src attribute -->
          <img
            data-src="./images/nature-4.jpg"
            class="swiper-lazy"
          />
          <!-- Preloader image -->
          <div class="swiper-lazy-preloader swiper-lazy-preloader-white"></div>
        </div>
        <div class="swiper-slide">
          <!-- Required swiper-lazy class and image source specified in data-src attribute -->
          <img
            data-src="./images/nature-5.jpg"
            class="swiper-lazy"
          />
          <!-- Preloader image -->
          <div class="swiper-lazy-preloader swiper-lazy-preloader-white"></div>
        </div>
        <div class="swiper-slide">
          <!-- Required swiper-lazy class and image source specified in data-src attribute -->
          <img
            data-src="./images/nature-6.jpg"
            class="swiper-lazy"
          />
          <!-- Preloader image -->
          <div class="swiper-lazy-preloader swiper-lazy-preloader-white"></div>
        </div>
        <div class="swiper-slide">
          <!-- Required swiper-lazy class and image source specified in data-src attribute -->
          <img
            data-src="./images/nature-7.jpg"
            class="swiper-lazy"
          />
          <!-- Preloader image -->
          <div class="swiper-lazy-preloader swiper-lazy-preloader-white"></div>
        </div>
        <div class="swiper-slide">
          <!-- Required swiper-lazy class and image source specified in data-src attribute -->
          <img
            data-src="./images/nature-8.jpg"
            class="swiper-lazy"
          />
          <!-- Preloader image -->
          <div class="swiper-lazy-preloader swiper-lazy-preloader-white"></div>
        </div>
        <div class="swiper-slide">
          <!-- Required swiper-lazy class and image source specified in data-src attribute -->
          <img
            data-src="./images/nature-9.jpg"
            class="swiper-lazy"
          />
          <!-- Preloader image -->
          <div class="swiper-lazy-preloader swiper-lazy-preloader-white"></div>
        </div>
      </div>
      <div class="swiper-button-next"></div>
      <div class="swiper-button-prev"></div>
      <div class="swiper-pagination"></div>
    </div>

    <!-- Swiper JS -->
    <script src="./swiper/swiper-bundle.min.js"></script>

    <!-- Initialize Swiper -->
    <script>
      var swiper = new Swiper(".mySwiper", {
        lazy: true,
        pagination: {
          el: ".swiper-pagination",
          clickable: true,
        },
        navigation: {
          nextEl: ".swiper-button-next",
          prevEl: ".swiper-button-prev",
        },
      });
    </script>
  </body>
</html>
